package com.example.stgv;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class InputScore extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_input_score);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.my_menu, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			Intent openSetting = new Intent(this,
					SettingsActivity.class);
			startActivity(openSetting);
		} else if (id == R.id.act_diemdanh) {
			Intent openAttStudent = new Intent(this,
					AttStudent.class);
			startActivity(openAttStudent);;
		} else if (id == R.id.act_diem) {
			Intent openInputScore = new Intent(this,
					InputScore.class);
			startActivity(openInputScore);
		} else if (id == R.id.action_newHS) {
			Intent openStudent = new Intent(this, AddStudent.class);
			startActivity(openStudent);
		} else if (id == R.id.action_newLop) {
			Intent openClass = new Intent(this, AddClass.class);
			startActivity(openClass);
		} else {
		}
		return super.onOptionsItemSelected(item);
	}
}
